package com.example.aop.service.impl;

import com.example.aop.annotation.Log;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

/**
 * @author: qilongxin
 * @date: 2021/8/17 15:02
 */
@Service
public class TestServiceImpl {

    @Log("自定义注解，拦截请求")
    public String sayHello(String name) {
        if (name == null || "".equals(name)) {
            throw new RuntimeException("name is null!");
        }
        return "TestService welcome to this page: " + name;
    }
}
